DoEvents

Syntax: @DoEvents

The DoEvents command passes control to Windows and does not allow control to return until all the events waiting in the Windows queue have been completed. This command may be required whenever you need to ensure that Windows will respond as you expect to new events, such as keyboard input and mouse clicks. You could get unpredictable results if Windows was still tied up doing some other event - such as opening a large file or starting another application and you were trying to send a command to start another process.